# cart 表示购物车
cart = ["巧克力派", "鱿鱼丝", "碎冰冰", "Python从入门到入坟"]
for item in cart:
    print("扫码:", item)
print("----------------------------------------")
# cart_price 存放每个商品的价格
cart_price = [10, 15, 20, 99.99]
total_price = 0  # total: 总共
# for 循环做价格的累加
for price in cart_price:
    total_price += price
# str(xxx): 将其他类型的变量转成字符串类型
print("总价为: " + str(total_price))